package com.zj.sa_token.util.result;

public class ResultUtil {


    public static Result success(){
        return success(null);
    }


    public static Result success(String msg){
        Result result=new Result();
        result.setCode(200);
        result.setMsg(msg);
//        result.setData(object);
        return result;
    }

    public static Result success(Object object){
        Result result=new Result();
        result.setCode(200);
        result.setMsg("请求成功");
        result.setData(object);
        return result;
    }

    public static Result success(Object object,long size){
        Result result=new Result();
        result.setCode(200);
        result.setMsg("请求成功");
        result.setData(object);
        result.setSize(size);
        return result;
    }
 
    public static Result error(Integer code,String msg){
        Result result=new Result();
        result.setCode(code);
        result.setMsg(msg);
        return result;
    }
 
 
}